package labox.innovation.gameserver.network.serverpackets;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

public class TestServerPacket extends L2GameServerPacket {
	static Map<Integer, String> map = new HashMap<Integer, String>();
	static {
		map.put(1010, "admin");
		map.put(1011, "guest");
		map.put(1012, "你好");
	}
	private int _friendid;

	public TestServerPacket(int friendid) {
		_friendid = friendid;
	}

	@Override
	public String getType() {
		return "_S_WECLOME";
	}

	@Override
	protected void writeImpl() {
		if(map.containsKey(_friendid)){
			writeByte(1);//协议码
			writeShort(map.size());
			for(Entry<Integer, String> entry:map.entrySet()){
				writeString(entry.getValue());
			}
			
		}
		
	}

}
